package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.io.Serializable;
import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DvCuadroExpor generated by hbm2java
 */
@Entity
@Table(name = "DV_CUADRO_EXPOR", schema = "DEVOLUCIONES")
public class DvCuadroExpor implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8278994601657013799L;
	private DvCuadroExporId id;
	private RcRuc rcRuc;
	private EdDeclaraciones edDeclaraciones;
	private TbUnidadRecep tbUnidadRecep;
	private String cpais;
	private String nnrc;
	private Double vfob;
	private Double vingDivisa;
	private Double vtipoCambio;
	private Double vtotalFobExp;
	private Double vtotalDevol;
	private Integer bdenegada;
	private Date fpexportacion;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodificacion;
	private Long nregExportacion;

	public DvCuadroExpor() {
	}

	public DvCuadroExpor(DvCuadroExporId id, RcRuc rcRuc, Integer bdenegada) {
		this.id = id;
		this.rcRuc = rcRuc;
		this.bdenegada = bdenegada;
	}

	public DvCuadroExpor(DvCuadroExporId id, RcRuc rcRuc, EdDeclaraciones edDeclaraciones,
			TbUnidadRecep tbUnidadRecep, String cpais, String nnrc, Double vfob, Double vingDivisa,
			Double vtipoCambio, Double vtotalFobExp, Double vtotalDevol, Integer bdenegada,
			Date fpexportacion, String cusuario, Date fhingreso, Date fhmodificacion,
			Long nregExportacion) {
		this.id = id;
		this.rcRuc = rcRuc;
		this.edDeclaraciones = edDeclaraciones;
		this.tbUnidadRecep = tbUnidadRecep;
		this.cpais = cpais;
		this.nnrc = nnrc;
		this.vfob = vfob;
		this.vingDivisa = vingDivisa;
		this.vtipoCambio = vtipoCambio;
		this.vtotalFobExp = vtotalFobExp;
		this.vtotalDevol = vtotalDevol;
		this.bdenegada = bdenegada;
		this.fpexportacion = fpexportacion;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.nregExportacion = nregExportacion;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nit", column = @Column(name = "NIT", nullable = false, length = 14)),
			@AttributeOverride(name = "npoliza", column = @Column(name = "N_POLIZA", nullable = false, length = 8)),
			@AttributeOverride(name = "nfactura", column = @Column(name = "N_FACTURA", nullable = false, length = 8)),
			@AttributeOverride(name = "fexportacion", column = @Column(name = "F_EXPORTACION", nullable = false, length = 7)) })
	public DvCuadroExporId getId() {
		return this.id;
	}

	public void setId(DvCuadroExporId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT", nullable = false, insertable = false, updatable = false)
	public RcRuc getRcRuc() {
		return this.rcRuc;
	}

	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "I_INDICE")
	public EdDeclaraciones getEdDeclaraciones() {
		return this.edDeclaraciones;
	}

	public void setEdDeclaraciones(EdDeclaraciones edDeclaraciones) {
		this.edDeclaraciones = edDeclaraciones;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_UNIDAD_RECEP")
	public TbUnidadRecep getTbUnidadRecep() {
		return this.tbUnidadRecep;
	}

	public void setTbUnidadRecep(TbUnidadRecep tbUnidadRecep) {
		this.tbUnidadRecep = tbUnidadRecep;
	}

	@Column(name = "C_PAIS", length = 4)
	public String getCpais() {
		return this.cpais;
	}

	public void setCpais(String cpais) {
		this.cpais = cpais;
	}

	@Column(name = "N_NRC", length = 8)
	public String getNnrc() {
		return this.nnrc;
	}

	public void setNnrc(String nnrc) {
		this.nnrc = nnrc;
	}

	@Column(name = "V_FOB", precision = 12)
	public Double getVfob() {
		return this.vfob;
	}

	public void setVfob(Double vfob) {
		this.vfob = vfob;
	}

	@Column(name = "V_ING_DIVISA", precision = 12)
	public Double getVingDivisa() {
		return this.vingDivisa;
	}

	public void setVingDivisa(Double vingDivisa) {
		this.vingDivisa = vingDivisa;
	}

	@Column(name = "V_TIPO_CAMBIO", precision = 6)
	public Double getVtipoCambio() {
		return this.vtipoCambio;
	}

	public void setVtipoCambio(Double vtipoCambio) {
		this.vtipoCambio = vtipoCambio;
	}

	@Column(name = "V_TOTAL_FOB_EXP", precision = 12)
	public Double getVtotalFobExp() {
		return this.vtotalFobExp;
	}

	public void setVtotalFobExp(Double vtotalFobExp) {
		this.vtotalFobExp = vtotalFobExp;
	}

	@Column(name = "V_TOTAL_DEVOL", precision = 13)
	public Double getVtotalDevol() {
		return this.vtotalDevol;
	}

	public void setVtotalDevol(Double vtotalDevol) {
		this.vtotalDevol = vtotalDevol;
	}

	@Column(name = "B_DENEGADA", nullable = false, precision = 1, scale = 0)
	public Integer getBdenegada() {
		return this.bdenegada;
	}

	public void setBdenegada(Integer bdenegada) {
		this.bdenegada = bdenegada;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FP_EXPORTACION", length = 7)
	public Date getFpexportacion() {
		return this.fpexportacion;
	}

	public void setFpexportacion(Date fpexportacion) {
		this.fpexportacion = fpexportacion;
	}

	@Column(name = "C_USUARIO", length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", length = 7, updatable=false)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_MODIFICACION", length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@Column(name = "N_REG_EXPORTACION", precision = 10, scale = 0)
	public Long getNregExportacion() {
		return this.nregExportacion;
	}

	public void setNregExportacion(Long nregExportacion) {
		this.nregExportacion = nregExportacion;
	}

}
